package weibo4j.util;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

public class WeiboConfig {
	private Properties props = new Properties();
	public WeiboConfig(){
		String filePath = this.getClass().getClassLoader().getResource("/").getPath()+"/config.properties";
		try {
			props.load(new FileInputStream(filePath));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	static{
		
	}
	public String getValue(String key){
		return props.getProperty(key);
	}

    public void updateProperties(String key,String value) {    
            props.setProperty(key, value); 
    } 
}
